package com.example.jg.base;

import java.util.ArrayList;

public abstract class BasePresenter<V extends BaseView> {
    public V mview;
    private ArrayList<BaseModel> moldes= new ArrayList<BaseModel>();
    public BasePresenter(){
        initModel();
    }
    public void addModel(BaseModel model){
        moldes.add(model);
    }
    protected abstract void initModel();
    public void bindView(V view){
        this.mview=view;
    }
    public void dsetroy(){
        mview=null;
        for (int i = 0; i < moldes.size(); i++) {
            moldes.get(i).disposable();
        }
    }
}
